1. Field of the Invention
The present invention relates to a motor control apparatus configured to control a motor on the basis of a PWM (Pulse Width Modulation) system and, more specifically, to a motor control apparatus configured to detect currents in respective phases by using a single current detector.
2. Description of Related Art
For example, an electric power steering apparatus of a vehicle is provided with an electric motor such as a 3-phase brushless motor in order to provide a steering function with a steering auxiliary power in accordance with a steering torque of a steering handle. Examples of the motor control apparatus configured to control rotations of the motor includes a motor control apparatus on the basis of the PWM system (see Japanese Patent No. 4884356, JP-A-2010-279141, JP-A-2007-112416, JP-A-10-155278, JP-T-2005-531270, JP-A-2001-95279, U.S. Pat. No. 6,735,537, Japanese Patent No. 2540140, JP-A-63-73898, JP-A-9-191508, JP-A-2002-291284, and JP-A-2011-193637).
In general, the motor control apparatus on the basis of the PWM system includes an inverter circuit configured to drive a motor on the basis of a PWM signal, a control unit configured to control an operation of the inverter circuit, and a current detection circuit configured to detect motor currents. The inverter circuit includes the same number of pairs of upper and lower arms as the number of phases, and each pair of the upper arm and the lower arm is provided with a switching element. The current detection circuit includes a current detection resistance (hereinafter, referred to as “shunt resistance”) configured to detect motor currents in respective phases flowing in the inverter circuit. The control unit generates PWM signals having predetermined duties for the respective switching elements of the inverter circuit on the basis of a deviation between a target value of current to be fed to the motor and a value of the current detected by the shunt resistance, and outputs the generated PWM signals to the inverter circuit. The respective switching elements of the inverter circuit perform ON-OFF operations on the basis of the PWM signals. Accordingly, the current flows from a power source through the inverter circuit to the motor, and hence the motor rotates.
In the case where the shunt resistance configured to detect the motor current is provided on the lower arm for each phase of the inverter circuit, a current in each phase flowing to the motor may be detected as an actual measured value. However, in this case, the same number of shunt resistances as the number of the phases are required, and hence the configuration of a circuit becomes complicated. Therefore, detection of the current in each phase by using a single shunt resistance has been performed in the related art (see Japanese Patent No. 4884356, JP-A-2010-279141, JP-A-2007-112416, JP-T-2005-531270, and JP-A-2002-291284). This system is referred to as “single shunt system”, hereinafter. In the single shunt system, currents in two phases flowing through the shunt resistance are detected, and a current in a remaining phase is obtained by an arithmetic operation on the basis of the detected values (detailed description will be given later).
FIG. 11 illustrates an example of the motor control apparatus on the basis of the single shunt system. A motor control apparatus 200 is provided between a power circuit 5 and a motor 6, and includes an inverter circuit 2, a current detection circuit 3, and a control unit 20. The motor 6 is, for example, a 3-phase brushless motor used in an electric power steering apparatus of a vehicle. In order to detect a rotational angle of the motor 6, an angle detector 7 such as a resolver is provided. The power circuit 5 includes a DC power source, a rectifying circuit, and a smoothing circuit.
The inverter circuit 2 includes a 3-phase bridge provided with three pairs of upper and lower arms corresponding to Phase A, Phase B, and Phase C. An upper arm a1 and a lower arm a2 in Phase A have switching elements Q1 and Q2, respectively. An upper arm a3 and a lower arm a4 in Phase B have switching elements Q3 and Q4, respectively. An upper arm a5 and a lower arm a6 of Phase C have switching elements Q5 and Q6, respectively. These switching elements Q1 to Q6 are, for example, composed of FET (field-effect transistors). Hereinafter, the switching element for the upper arm for each phase is referred to as “upper switching element”, and the switching element for the lower arm for each phase is referred to as “lower switching element”.
The current detection circuit 3 configured to detect currents flowing to the motor 6 includes a shunt resistance Rs and an amplifier circuit 31. The shunt resistance Rs is connected between the inverter circuit 2 and the ground G. The amplifier circuit 31 is configured to amplify a voltage at both ends of the shunt resistance Rs and outputs an amplified voltage to the control unit 20. The control unit 20 calculates duties of the PWM signals in the respective phases on the basis of a deviation between a detected current value calculated from the voltage supplied by the amplifier circuit 31 and a target current value calculated from a steering torque supplied by a torque sensor (not illustrated). The PWM signals (PWM1 to PWM6) in the respective phases generated on the basis of the duties are output to the inverter circuit 2. The switching elements Q1 to Q6 of the inverter circuit 2 perform the ON-OFF operations on the basis of these PWM signals. Accordingly, the current flows from the power circuit 5 through the inverter circuit 2 to the motor 6, and hence the motor 6 rotates. Subsequently, the magnitude and the direction of the current flowing to the motor 6 are controlled in accordance with ON-OFF patterns of the switching elements Q1 to Q6 in accordance with the duties and the phases of the PWM signals.
FIG. 12 to FIG. 15 are explanatory drawings illustrating a principle of motor current detection on the basis of the single shunt system. As illustrated in FIG. 12, PWM signals in the respective phases in accordance with duties of Phase A, Phase B, and Phase C are generated on the basis of sawtooth-like carrier signals. Since a method of generating PWM signals are well known, description will be omitted here. Hereinafter, a phase having a maximum duty is referred to as “maximum phase”, a phase having a minimum duty is referred to as “minimum phase”, and a phase having an intermediate duty is referred to as “intermediate phase”. In FIG. 12, Phase A corresponds to the maximum phase, Phase B corresponds to the minimum phase, and Phase C corresponds to the intermediate phase.
The PWM signals in the respective phases in FIG. 12 represent PWM signals to be supplied to the upper switching elements for the respective phases (PWM1, PWM3, and PWM5 in FIG. 11). The same applies to the drawings to be described below. The PWM signals to be supplied to the lower switching elements of the respective phases (PWM2, PWM4, and PWM 6 in FIG. 11) correspond substantially to signals obtained by inverting the PWM signals in the respective phases from those in FIG. 12. The PWM cycle illustrated in FIG. 12 corresponds to a period from a fall to a next fall of a carrier signal, and one control cycle includes five PWM cycles. One PWM cycle is, for example, 50 μs. In this case, one control cycle is 250 μs. Hatched portions illustrated in FIG. 12 indicate current detection terms for detecting currents flowing to the shunt resistance Rs. The current detection terms are set as predetermined terms until the respective PWM signals in the intermediate phase (Phase C) and the minimum phase (Phase B) rise in the last PWM cycles of the respective control cycles.
FIG. 13 is a drawing illustrating a portion surrounded by an alternate long and short dash line in FIG. 12 in an enlarged scale, added with a waveform of a current flowing through the shunt resistance Rs (shunt current). In FIG. 13, W1 represents a current detection term in which a current in Phase A is to be detected, and W2 represents a current detection term in which a current in Phase B is to be detected.
In the current detection term W1, the PWM signal in Phase A is “H” (High), the PWM signal in Phase B is “L” (Low), and the PWM signal in Phase C is “L”. Therefore, as illustrated in FIG. 14, the upper switching elements Q1, Q3, and Q5 are ON, OFF, OFF, respectively, and the lower switching elements Q2, Q4, Q6 are OFF, ON, ON, respectively. Consequently, current routes indicated by broken line arrows in FIG. 14 are formed, and a Phase A current IA flows to the shunt resistance Rs. Voltages generated by the Phase A current IA at both ends of the shunt resistance Rs enter the control unit 20 via the amplifier circuit 31 (FIG. 11), and are A/D converted (analogue-digital conversion) in the control unit 20, whereby the current value IA of the current in Phase A is detected.
In the current detection term W2, the PWM signal in Phase A is “H”, the PWM signal in Phase B is “L”, and the PWM signal in Phase C is “H”. Therefore, as illustrated in FIG. 15, the upper switching elements Q1, Q3, and Q5 are ON, OFF, ON, respectively, and the lower switching elements Q2, Q4, Q6 are OFF, ON, OFF, respectively. Consequently, current routes indicated by broken line arrows in FIG. 15 are formed and Phase B current −IB having an opposite polarity flows to the shunt resistance Rs. Voltages generated by the Phase B current −IB at both ends of the shunt resistance Rs enter the control unit 20 via the amplifier circuit 31 (FIG. 11) and are A/D converted in the control unit 20, so that a current value IB of the B-phase current is detected.
When the current value IA of the Phase A current and the current value TB of the Phase B current are detected, the current value IC of the Phase C current can be obtained by arithmetic operation by using the values IA and IB. In other words, according to Kirchhoff's law, a relationship of IA+IB+IC=0 is established among the current values of the respective phases IA, IB, and IC, so that the current value IC of the Phase C current can be calculated as IC=−(IA+IB).
In order to achieve a normal A/D conversion of the current detected by the shunt resistance Rs in the control unit 20 the current detected by the shunt resistance Rs in the motor control apparatus 200 on the basis of the single shunt system as described above, a current having the constant magnitude needs to flow continuously for a certain period (for example, at least 2 μs) to the shunt resistance Rs. Therefore, intervals of timing at which the switching elements Q1 to Q6 of the inverter circuit 2 are turned ON or OFF may become very short between one phase and another phase depending on the magnitude relationship among duties of the PWM signals in the respective phases. In this state, since currents required for the detection of the current do not flow to the shunt resistance Rs, currents in two phases are not detected, and hence calculation of a current in remaining one phase becomes impossible.
Therefore, a method of shifting the phases of the PWM signals is known for cases where the intervals of timing at which the switching elements are turned ON or OFF is shorter than a threshold value between one phase and another phase is known (see Japanese Patent No. 4884356, JP-A-2010-279141, and U.S. Pat. No. 6,735,537). For example, in FIG. 12, the phase of the Phase C PWM signal in the intermediate phase is shifted backward with respect to the Phase A PWM signal in the maximum phase. The phase of the Phase B PWM signal in the minimum phase is shifted further backward with respect to the phase of the Phase C PWM signal in the intermediate phase. With such phase shifting, the intervals of timing at which the switching elements are turned ON or OFF between one phase and another phase are increased, so that the currents flows to the shunt resistance Rs only for a period required for detecting the current. Consequently, sufficient current detection terms W1 and W2 are secured, and hence the 2-phase current flowing to the motor 6 is accurately detected.
However, if the phases of the PWM signals are suddenly shifted when the control cycle is moved from one control cycle to the next control cycle, an abrupt fluctuation occurs in the motor current instantaneously, which may cause a noise in the motor due to a current ripple. Accordingly, in Japanese Patent No. 4884356, an abrupt current fluctuation is suppressed by shifting the phases of the PWM signals gradually, whereby generation of motor noise is prevented.
FIG. 16 is a drawing illustrating a method of shifting the phases according to Japanese Patent No. 4884356. Here, an example in which the phases of the PWM signals are shifted gradually at a control cycle (n+2) on the basis of current values detected during control cycle (n) will be described.
Currents in two phases are detected in the current detection terms (hatched portions) at the last PWM cycle during control cycle (n), and a current of remaining one phase is detected by an arithmetic operation on the basis of the detected currents. The detected current values in the respective phases are expressed by I(n) inclusively. During the control cycle (n), the rotational angle of the motor 6 is detected by the angle detector 7. Subsequently, the detected current values I(n), the target current values, and the detected rotational angle of the motor are used to calculate duties of the PWM signals in the respective phases. The calculated duties in the respective phases are expressed by D(n) inclusively. Subsequently, the calculated duties in the respective phases are compared and are ranked, so that the maximum phase, the minimum phase, and the intermediate phase of the PWM signals are determined. Then, on which phase, and how much, the shift is to be performed are arithmetically operated in accordance with the magnitude relationship of the duties, whereby phase shift amounts of the respective phases are determined. The determined phase shift amounts of the respective phases are expressed by P(n) inclusively.
The duties D (n−1) and the phase shift amounts P(n−1) of the PWM signals in the control cycle (n+1) are determined by using current values I(n−1) detected during the current detection terms (hatched portions) in the control cycle (n−1), the target current value, and the rotational angle of the motor detected in the control cycle (n−1).
If the duties and the phase shift amounts are determined, generation of the PWM signals is enabled. Therefore, in the control cycle (n+2), PWM signals having a gradually shifting phase are output. Here, the phase of Phase A is shifted gradually forward, and the phase of Phase B is shifted gradually backward. The phase of Phase C is not shifted. As regards Phase A and Phase B, the phase is shifted by ⅕ at every cycle from the PWM cycles #1 to #5, and shifting is completed in the PWM cycle #5 as apparent from the drawings. Consequently, in the PWM cycle #5, the interval of timing at which the PWM signals of the respective phases are turned ON or OFF is increased in the PWM cycle #5, so that the currents in two phases are detected during the current detection terms (hatched portions).
In this manner, by shifting the phases of the PWM signals gradually, the abrupt fluctuation of the motor current is suppressed, so that currents in two phases can be detected while preventing generation of noise caused by the current ripple.
In the phase shifting method illustrated in FIG. 16, the duties D(n) of the PWM signal and the phase shift amounts P(n) of the PWM signals are determined on the basis of the current values I(n) and a rotational angle of the motor detected in the control cycle (n) and a rotational angle of the motor. However, the PWM signals on which these values are reflected are output only in the control cycle (n+2). The reason is that arithmetic processing in the CPU needs a certain period of time, and hence output of the PWM signals cannot be done in a control cycle (n+1). Therefore, a delay of one control cycle or more may occur from the detection of the current or the rotational angle of the motor (hereinafter, referred to as “current or the like”) through the determination of the duties and the phase shift amounts until the PWM signals are output. Therefore, the responsiveness of the motor is not good and hence the following capability in the case where the steering handle is turned sharply is not sufficient.